#-*- codeing = utf-8 -*-
#@Time : 2020/11/24 19:40
#@Author : 阳某
#@File : 05.循环.py
#@Software : PyCharm


# for循环通常是从一个sequence类型，比如字符串，列表，元组中一次取出每一个元素进行操作
a = 'student'
for i in a:
    print(i)

def inputCommand():
    while True:
        command = input("请输入命令:")
        if command == 'exit':
            break
        print(f'输入的命令是{command}')


    print('末尾语句')

inputCommand()

def inputCommand():
    while True:
        command = input("请输入命令:")
        if command == 'exit':
            return
        print(f'输入的命令是{command}')


    print('末尾语句')

inputCommand()

while True:
    command = input("请输入命令:")
    if command == 'exit':
        break
    if command == 'cont':
        continue
    print(f'输入的命令是{command}')

print('程序结束')
